#!/usr/bin/env python
#-*- coding:utf-8 -*-

'''
Created on 2012-01-15

@author: zhangchong
'''


#/data/log/log/[0-9,a-z]*/[0-9]*[0-9]

import sys
import os
import json
import string
import MySQLdb
import simplejson
import Config
import datetime

import CpLog
import Split
import Statist




def main(date=""):
    
    argv = sys.argv
    try:
        date = argv[1]
    except:
         return
     
    #建立log目录
    if(not os.path.exists(Config.ScriptsDir + "log")):
       os.makedirs(Config.ScriptsDir + "log")
    else:
       if(not os.path.isdir(Config.ScriptsDir + "log")):     
            os.makedirs(Config.ScriptsDir + "log")
               
    CpLog.cpLog(date,localDir="/opt/data/backuplogs/")
    Split.split(date)
   
    
       
if __name__ == "__main__":
    main()
    
    
    
    
 
    
    
   


    
    
   
